package com.zhoug.common.filters;

import android.text.InputFilter;
import android.text.Spanned;

import com.zhoug.common.utils.TextUtils;

/**
 * 过滤中文输入
 * @Author 35574
 * @Date 2022/1/27
 * @Description
 * @deprecated
 * @see NoChineseInputFilter
 */
@Deprecated
public class ChineseInputFilter implements InputFilter {
    @Override
    public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
        if(source!=null){
            String s = source.toString();
            if(TextUtils.containsChinese(s)){
                return "";
            }
        }
        return source;
    }

}
